ADNI3 - ROI Pairs Analysis

  1. Basic setup, file directories, file names
  2. Read image list file
  3. Get ROI pairs set for a given HEMI, ANCHOR_REGION combo
  4. Do basic sanity checking on the time series
  5. Compute the correlations
  6. Do basic sanity checking on the correlations
  7. Do the sample ANOVA with FDR
  8. Post process the sample ANOVA (significant ROI pairs) post hoc t-tests
  9. Do the permutation ANOVA
  10. Update the ANOVA sampe FDR corrected p value with ANOVA permutation results
  11. Post process the sample ANOVA (significant ROI pairs) post hoc t-tests with adjusted FDR corrected p value
  12. Generate tables and graphs for publication

1. Basic setup

2. Read image list file

##           rid   id_mri  id_fmri  dx dxbl
## 1  002_S_0413  I863056  I863058  CN   CN
## 2  002_S_1261  I989320  I989324 MCI   CN
## 3  002_S_4473  I827361  I827363 MCI EMCI
## 4  002_S_4654  I848000  I848004 MCI LMCI
## 5  002_S_6007  I988538  I988542  CN  SMC
## 6  002_S_6030  I861965  I861967  CN  SMC
## 7  002_S_6103  I938767  I938771  CN  SMC
## 8  003_S_1122 I1020423 I1020436 MCI LMCI
## 9  003_S_6067  I912447  I912451  CN   CN
## 10 003_S_6258  I973293  I973297 MCI EMCI
## 11 003_S_6268 I1005884 I1005896 MCI EMCI
## 12 006_S_4357  I964841  I964844  CN   CN
## 13 006_S_4960 I1003607 I1003610  CN LMCI
## 14 006_S_6252  I969773  I969776 MCI LMCI
## 15 006_S_6291  I989656  I989659 MCI LMCI
## 16 006_S_6441 I1020186 I1020189 MCI LMCI
## 17 011_S_0021  I957745  I957749  CN   CN
## 18 011_S_4105  I915862  I915866  CN   CN
## 19 011_S_6418 I1009810 I1009814  CN   CN
## 20 012_S_5157 I1116800 I1116805  CN  SMC
## 21 012_S_5195 I1071932 I1072832  CN  SMC
## 22 014_S_6148  I951357  I951360  CN  SMC
## 23 014_S_6424 I1037394 I1037397  CN  SMC
## 24 014_S_6522 I1037958 I1037960  CN  SMC
## 25 018_S_2155  I905773  I905776 MCI EMCI
## 26 018_S_2180 I1051277 I1051285 MCI EMCI
## 27 018_S_4400  I909607  I909610  CN   CN
## 28 018_S_6351  I995861  I995864  CN   CN
## 29 019_S_6315  I990219  I990223 MCI LMCI
## 30 019_S_6483 I1020137 I1020140 MCI LMCI
## 31 020_S_5140  I935824  I935828  CN  SMC
## 32 020_S_5203 I1086072 I1086079  CN  SMC
## 33 020_S_6185  I958011  I958015  CN   CN
## 34 022_S_5004  I973603  I973606 MCI EMCI
## 35 022_S_6069  I895057  I895059  CN  SMC
## 36 024_S_5290  I904007  I904009  CN  SMC
## 37 031_S_4021 I1086094 I1086097  CN   CN
## 38 032_S_4277 I1025881 I1025885  CN   CN
## 39 032_S_5289  I996840  I996828  CN  SMC
## 40 032_S_6279  I981036  I981034  CN  SMC
## 41 032_S_6293  I993285  I993281  CN   CN
## 42 035_S_6200  I964917  I964919  CN  SMC
## 43 035_S_6488 I1019265 I1019267  CN   CN
## 44 037_S_4028  I927511  I927515  CN   CN
## 45 037_S_4410  I824980  I824984  CN   CN
## 46 037_S_6144  I944650  I944654  CN   CN
## 47 041_S_1418  I882537  I882539 MCI LMCI
## 48 041_S_4427  I915902  I915906  CN   CN
## 49 041_S_4876  I872923  I872925 MCI EMCI
## 50 041_S_5100  I881729  I881731  CN  SMC
## 51 041_S_6136  I944422  I944424  CN   CN
## 52 041_S_6401 I1008726 I1008728  CN  SMC
## 53 053_S_5296 I1079463 I1079466  CN  SMC
## 54 068_S_0802  I878974  I878976 MCI LMCI
## 55 068_S_4424  I892735  I892737  CN   CN
## 56 068_S_4431  I913456  I913458 MCI EMCI
## 57 082_S_2121  I963756  I963758 MCI EMCI
## 58 082_S_4428  I947589  I947591  CN   CN
## 59 082_S_5278  I969187  I969190  CN  SMC
## 60 082_S_6197  I992246  I992249  CN  SMC
## 61 082_S_6283  I992286  I992291  CN   CN
## 62 082_S_6563 I1051051 I1051055  CN  SMC
## 63 094_S_2201  I916812  I916814  CN EMCI
## 64 094_S_6250  I979816  I979818  CN  SMC
## 65 100_S_4556  I928482  I928485  CN EMCI
## 66 114_S_6309  I992776  I992775  CN  SMC
## 67 116_S_4453  I958094  I958096  CN   CN
## 68 116_S_6119  I957994  I957997  CN  SMC
## 69 116_S_6428 I1017005 I1017007 MCI LMCI
## 70 116_S_6439 I1015823 I1015826  CN   CN
## 71 123_S_0072  I922176  I922179  CN   CN
## 72 123_S_6118  I927419  I927422  CN  SMC
## 73 130_S_4817  I841950  I841953 MCI LMCI
## 74 130_S_6019  I854993  I854996  CN  SMC
## 75 130_S_6037  I873168  I873171  CN  SMC
## 76 130_S_6319  I990195  I990198  CN  SMC
## 77 130_S_6372 I1001329 I1001332  CN  SMC
## 78 141_S_6041  I871844  I871842 MCI EMCI
## 79 141_S_6061 I1116406 I1116411 MCI  SMC
## 80 141_S_6253  I974714  I974704  CN  SMC
## 81 141_S_6423 I1018387 I1018395  CN   CN
## 82 168_S_6062  I892771  I892773  CN  SMC
## 83 168_S_6085  I916399  I916401  CN   CN
## 84 177_S_6335  I995457  I995459  CN  SMC
## 85 177_S_6409 I1029048 I1012536  CN  SMC
## 86 301_S_6224  I963152  I963156  CN   CN
## 87 305_S_6157  I958026  I958031  CN   CN
## 88 305_S_6188  I968581  I968584  CN   CN
## 89 305_S_6498 I1019281 I1019284 MCI EMCI
## 90 941_S_4292  I893552  I893554  CN   CN
## 91 941_S_6017  I852748  I852750 MCI LMCI
## 92 941_S_6054  I880643  I880645  CN   CN
## 93 941_S_6058  I884964  I884966  CN  SMC
## 94 941_S_6068  I893045  I893047 MCI LMCI
## 95 941_S_6094  I921879  I921881  CN   CN
## # A tibble: 4 x 2
##   dxbl      n
##   <chr> <int>
## 1 CN       33
## 2 EMCI     13
## 3 LMCI     14
## 4 SMC      35
## # A tibble: 2 x 2
##   dx        n
##   <chr> <int>
## 1 CN       69
## 2 MCI      26

3. Get ROI pairs set for a given HEMI, ANCHOR_REGION combo

4. Do basic sanity checking on the time series

## [1] 0

##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## 0.0002909 0.0003985 0.0004432 0.0004499 0.0005039 0.0006323
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.1338  0.3174  0.4436  0.5801  0.7086  6.9380

## [1] 0

##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## 0.0002890 0.0003987 0.0004438 0.0004499 0.0005038 0.0006342
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
## 0.07961 0.26009 0.34326 0.44323 0.49408 6.28562

5. Compute the correlations

6. Do basic sanity checking on the correlations

##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## -0.08065  0.03912  0.07074  0.07922  0.10698  0.75683
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0734  0.1200  0.1324  0.1348  0.1464  0.2494

7. Do the sample ANOVA with FDR

##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## 0.0000003 0.0005872 0.0020894 0.0070387 0.0065790 0.4068631

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.9778  4.3452  5.2880  5.4546  6.3504 13.4201

8. Post process the sample ANOVA (significant ROI pairs) with post hoc t-tests

##        p            
##  Min.   :2.510e-07  
##  1st Qu.:3.935e-04  
##  Median :1.272e-03  
##  Mean   :2.009e-03  
##  3rd Qu.:3.035e-03  
##  Max.   :7.818e-03

9. Do the permutation ANOVA with multiple hypothesis correction

10. Determine the significant post hoc t tests based on permutation ANOVA FDR p value

##  Post-process Permutation ANOVA FDR ( q= 0.005 ) p Value = 0.003

11. Post process the sample ANOVA (significant ROI pairs) post hoc t-tests with adjusted FDR corrected p value

## Sample-based post hoc t-test FDR-corrected p values:
## Permutation-based post hoc t-test FDR-corrected p values:
##   smc_cn_t_pstar emci_cn_t_pstar lmci_cn_t_pstar emci_smc_t_pstar
## 1   0.0005365496    0.0005992598    0.0007027061     0.0004896183
##   lmci_smc_t_pstar lmci_emci_t_pstar
## 1      0.000180546        0.00128898

12. Generate file lists for AFNI images

13. Generate spaghetti plots

14. Generate cluster analysis

## mean_by_dx
##   1   2   3   4   5   6   7 
## 349 195  12 264 566 311 763

15. Deep-dive post hoc t-test results

##   smc_cn emci_cn lmci_cn emci_smc lmci_smc lmci_emci
## 1    264     295     347      241       89       636